package com.company.beauty.common.handler;

import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;

import java.lang.reflect.Method;

/**
 * <p>simple async exception handler</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2022/9/26
 */
@Slf4j
public class SimpleAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHandler {

    @Override
    public void handleUncaughtException(Throwable ex, Method method, Object... params) {
        log.error("Unexpected exception occurred invoking async method:" + method, ex);
    }

}
